<script setup lang="ts">
import hzz from '@/assets/imgs/hzz.jpg'
</script>
<template>
  <div class="profile-frame">
    <div class="container">
      <div class="profile">
        <div class="img">
          <div class="outer-circle"></div>
          <div class="inner-circle"></div>
          <img :src="hzz" alt="it's me" />
        </div>

        <div class="desc">
          <h4>Pkmer-HZZ</h4>
          <p>Java Programmer</p>
        </div>

        <button>Follow</button>
        <button>Message</button>
      </div>
      <div class="aside">
        <h4>523</h4>
        <p>Posts</p>
      </div>
      <div class="aside">
        <h4>1387</h4>
        <p>Likes</p>
      </div>
      <div class="aside">
        <h4>146</h4>
        <p>Follower</p>
      </div>
    </div>
  </div>
</template>

<style lang="scss" scoped>
.profile-frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top right, #deba88, #ce8351);
  .container {
    width: 500px;
    height: 500px;
    display: grid;
    grid-gap: 0.08rem;
    grid-template-columns: repeat(5, 1fr);
    color: #666;
    overflow: hidden;
    background-color: #fff;

    .profile {
      background: #fff;
      grid-row: 1 / span 3;
      grid-column: 1 / span 3;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 0.5rem;
      .img {
        width: 8rem;
        height: 8rem;
        position: relative;

        &:hover {
          .outer-circle {
            transform: rotate(180deg);
          }

          .inner-circle {
            transform: rotate(0deg);
          }
        }

        .outer-circle {
          position: absolute;
          width: 100%;
          height: 100%;
          border: 1px solid #333;
          border-right: 1px solid rgba(0, 0, 0, 0);
          border-radius: 100%;
          transform: rotate(0deg);
          transition: all 1.5s ease;
        }

        .inner-circle {
          position: absolute;
          top: 5%;
          left: 5%;
          width: 90%;
          height: 90%;
          border: 1px solid #333;
          border-right: 1px solid rgba(0, 0, 0, 0);
          border-radius: 100%;
          transform: rotate(180deg);
          transition: all 1.5s ease;
        }

        img {
          position: absolute;
          left: 50%;
          top: 50%;
          transform: translate(-50%, -50%);
          width: 80%;
          height: 80%;
          border-radius: 100%;
        }
      }

      .desc {
        margin-top: 1rem;
        margin-bottom: 5rem;
        text-align: center;
        h4 {
          padding: 0.3rem 0;
        }
      }

      button {
        width: 70%;
        padding: 8px;
        margin-bottom: 1rem;
        font-size: 1.1rem;
        border-radius: 20px;
        transition: all 0.3s ease;

        &:hover {
          background-color: #333;
          color: #fff;
        }
      }
    }

    .aside {
      grid-column: 4 / span 2;
      /* background-color: aqua; */
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      background-color: #f5e8df;
      transition: all 0.3s ease;
      &:hover {
        background-color: #e1cfc2;
      }
    }
    h4 {
      font-size: 1.2rem;
    }
    p {
      font-size: 0.8rem;
    }
  }
}
</style>
